﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DMS.MechanicalReport.Integration.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            string filename = "20120131-1250.pdf";
            byte[] contents = SharePointHelper.GetFileFromFileSystem(@"D:\Document Types\Receipts\20120131-1250.pdf");
            SharePointHelper helper = new SharePointHelper();
            MechanicalReportMetaData meta = new MechanicalReportMetaData
                                                {
                                                    BranchName = "Auckland Commercial",
                                                    BranchCode = "203",
                                                    ReportID = "123456",
                                                    Vin = "123aaabbbcccdddeeefff",
                                                    Plate = "ERP805",
                                                    ReportVersion = 1
                                                };
            bool success = helper.UploadFile("1234567", contents,meta);
            if(success)
            Console.WriteLine("document uploaded.");
            else
            {
                Console.WriteLine("document failed.");
                
            }
            Console.ReadLine();
        }
    }
}
